package com.zkjl.protect_business.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.zkjl.protect_business.entity.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.List;
import java.util.Map;

@Data
@Document(indexName = "pb_business_jichuxinxi_danweixinxi")
@ApiModel(description = "单位实体")
public class Organization extends BaseEntity {

    @Id
    @ApiModelProperty(notes = "id")
    private String id;

    @ApiModelProperty(notes = "单位名称")
    @Field(name = "org_name",type = FieldType.Keyword)
    private String orgName;

    @ApiModelProperty(notes = "编号")
    @Field(name = "org_num",type = FieldType.Keyword)
    private String orgNum;

    @ApiModelProperty(notes = "驻防地区")
    @Field(type = FieldType.Keyword)
    private String region;

    @ApiModelProperty(notes = "在编人数")
    @Field(type = FieldType.Integer)
    private Integer number;

    @ApiModelProperty(notes = "父级单位 id")
    @Field(type = FieldType.Keyword)
    private String pid;

    @ApiModelProperty(notes = "父级单位名称")
    @Field(type = FieldType.Keyword)
    private String pname;

    @ApiModelProperty(notes = "单位路径 类似 pid/id")
    @Field(type = FieldType.Keyword)
    private String path;

    @ApiModelProperty(notes = "排序")
    @Field(type = FieldType.Integer)
    private Integer sort;

    @ApiModelProperty(notes = "扩展字段")
    @Field(type = FieldType.Object)
    private List<OrgField> fields;



}
